package com.ruoyi.wm.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wm.mapper.WmMedicineStockMapper;
import com.ruoyi.wm.domain.WmMedicineStock;
import com.ruoyi.wm.service.IWmMedicineStockService;
import com.ruoyi.common.core.text.Convert;

/**
 * 药物库存清算Service业务层处理
 * 
 * @author hpf
 * @date 2021-11-28
 */
@Service
public class WmMedicineStockServiceImpl implements IWmMedicineStockService 
{
    @Autowired
    private WmMedicineStockMapper wmMedicineStockMapper;

    /**
     * 查询药物库存清算
     * 
     * @param id 药物库存清算ID
     * @return 药物库存清算
     */
    @Override
    public WmMedicineStock selectWmMedicineStockById(Long id)
    {
        return wmMedicineStockMapper.selectWmMedicineStockById(id);
    }

    /**
     * 查询药物库存清算列表
     * 
     * @param wmMedicineStock 药物库存清算
     * @return 药物库存清算
     */
    @Override
    public List<WmMedicineStock> selectWmMedicineStockList(WmMedicineStock wmMedicineStock)
    {
        return wmMedicineStockMapper.selectWmMedicineStockList(wmMedicineStock);
    }

    /**
     * 新增药物库存清算
     * 
     * @param wmMedicineStock 药物库存清算
     * @return 结果
     */
    @Override
    public int insertWmMedicineStock(WmMedicineStock wmMedicineStock)
    {
        return wmMedicineStockMapper.insertWmMedicineStock(wmMedicineStock);
    }

    /**
     * 修改药物库存清算
     * 
     * @param wmMedicineStock 药物库存清算
     * @return 结果
     */
    @Override
    public int updateWmMedicineStock(WmMedicineStock wmMedicineStock)
    {
        return wmMedicineStockMapper.updateWmMedicineStock(wmMedicineStock);
    }

    /**
     * 删除药物库存清算对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWmMedicineStockByIds(String ids)
    {
        return wmMedicineStockMapper.deleteWmMedicineStockByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除药物库存清算信息
     * 
     * @param id 药物库存清算ID
     * @return 结果
     */
    @Override
    public int deleteWmMedicineStockById(Long id)
    {
        return wmMedicineStockMapper.deleteWmMedicineStockById(id);
    }
}
